package cn.kgc.spring.day03.entity;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import java.util.Date;

/**
 * @author 课工场
 * @date 2024/7/15
 * @description
 *    @Component
 *    @Value("1")  实现对象属性的初始化操作
 */
@Data
@Component("usr")
public class User {

    @Value("${user.id}")
    private Integer id;
    @Value("${user.username}")
    private String username;
    @Value("${user.password}")
    private String password;
    @Value("${user.birth}")
    private Date birth;

}
